home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / C-H / Discipline2.0.2.sit / Discipline 2.0.2 / Discipline Examples / AddrTest.c next >
Text File  |  1991-04-09  |  1KB  |  48 lines

  1.  
  2. #include    <Types.h>
  3. #include <Memory.h>
  4. #include <QuickDraw.h>
  5. #include <Packages.h>
  6. #include <Strings.h>
  7. #include <SysEqu.h>
  8. #include <ToolUtils.h>
  9. #include <Traps.h>
  10. #include "Wimpy.h"
  11.  
  12. //the call to testAddr
  13. pascal    char    *    theTest    (long    *    selector)
  14. {
  15. switch (selector[0])
  16.     {
  17.     case 0:
  18.                     /* return test name */
  19.             return("AddressTst");
  20.             break;
  21.     case 1:            /*return test description , including test parameters in “” */
  22.             return("Check “testee,1,L” points to valid memory.");
  23.             break;
  24.     case 2:            /*do guts of test or make call to actual test proceduure */
  25.             return testAddr((Ptr)selector[1]);
  26.  
  27.             /*in test return a string for the test*/
  28.             /*failing or nil for test passes */
  29.             break;
  30.     default :
  31.         return (nil);
  32.         break;
  33.     };
  34. }
  35.  
  36.    
  37. /*
  38. make instructions
  39. c AddrTst.c -r -b -t -sym off -mbg off -s someSegName -o AddrTst.c.o
  40. c AddrTst2.c -r -b -t -sym off -mbg off -s someSegName -o AddrTst2.c.o
  41. link  -mf -rt dsct=1044 -sg AddressTst="Main" -m "THETEST"        ∂
  42.             -sym off                            ∂
  43.             "AddrTst.c.o"                     ∂
  44.             "AddrTst2.c.o"                     ∂
  45.              -o "Discipline Startup"  
  46.  
  47. make sure the dsct number is unique and the segment name is the same as the test name
  48. */